package com.verisette.ncos.service.master.gateway;

import java.util.List;

import org.corp.agi.common.util.BeanContextFactory;
import org.corp.agi.service.bean.ServiceRequest;
import org.corp.agi.service.bean.ServiceResponse;
import org.corp.agi.service.bizprocess.BusinessProcess;

import com.verisette.ncos.persistence.domain.CustomMasterObjectAuthByUsg;
import com.verisette.ncos.persistence.domain.MasterUserGroup;
import com.verisette.ncos.persistence.domain.MasterUserProfile;

/**
 * {Description here}
 *
 * @author Thippawan Muangchu (Tip)
 * @since Mar 31, 2010 2:01:12 PM
 * @version 1.0.0
 * @see 
 */
public class UserGroupAuthorizationServiceImpl implements UserGroupAuthorizationService {

	@Override
	public ServiceResponse<List<MasterUserGroup>> loadUserGroup(
			ServiceRequest<MasterUserGroup> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("loadUserGroupAuthorizationProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<List<CustomMasterObjectAuthByUsg>> getAuthList(
			ServiceRequest<CustomMasterObjectAuthByUsg> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("findUserGroupAuthProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<List<CustomMasterObjectAuthByUsg>> updateUserGroup(
			ServiceRequest<CustomMasterObjectAuthByUsg> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("updateUserGroupAuthProcess");
		return process.execute(request);
	}
	
	@Override
	public ServiceResponse<List<MasterUserGroup>> inquiryUserGroupByUserProfile(
			ServiceRequest<MasterUserProfile> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("inquiryUserGroupByUserProfileProcess");
		return process.execute(request);
	}

}
